(function(angular) {
	'use strict';
	angular.module('fs.waf').controller('waf.popup.documentViewerController', controller);
	controller.$inject = [ '$scope', '$uibModalInstance', 'dialogsModule' ];
	function controller($scope, $uibModalInstance, dialogsModule) {
		var ctrl = this, log = $scope.loggerFactory.getLogger("textViewer");
		ctrl.dialogsModule = dialogsModule;
		
		ctrl.close = function() {
			if (!dialogsModule.btnCallback || !dialogsModule.btnCallback['close'] || dialogsModule.btnCallback['close']() !== false) {
				$uibModalInstance.dismiss();
			}
		};
	}
	
})(angular);